import { gateMain } from "../GateMain";
import { RpcCallRes, RpcHandler, RpcHandlerProxy } from "kilom";
import { SvrType } from "../../../config/SvrCfg";

export default class RpcGate extends RpcHandler {

    /**
     * 设置在线人数
     */
    setOnlines(sid: number, onlines: number): RpcCallRes {
        gateMain.sidOnlines[sid] = onlines;
        return {};
    }

}

declare global {
    interface Rpc {
        [SvrType.gate]: {
            main: RpcHandlerProxy<RpcGate>
        }
    }
}